// ------------------------------------------------------------------
// File_name: SR.v
// Function : An S-R Latch using ~ and &.
//    This module represents the functionality of a simple latch,
//    which is a sequential logic device, using combinational 
//    ~AND expressions connected to feed back on each other.
// ------------------------------------------------------------------
// Author   : QilinZhao
// Version  : v-1.0
// Date     : 2013-06-28
// E-mail   : forqilin@163.com
// Copyright: QiXin Studio
// ------------------------------------------------------------------

module SR (
  output Q, Qn, 
  input S, R
);
  wire q, qn;  // Internal wiring.
  
  assign #1 Q  = q;
  assign #1 Qn = qn;

  assign #10 q  = ~(S & qn);
  assign #10 qn = ~(R & q );

endmodule // SR
